<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // es6的展开运算符
        //    ...

        // console.log(100, 200, 300, 400)
        // var arr = [100, 200, 300, 400]
        // console.log(arr)
        // console.log(...arr)

        // var arr1 = [10, 20]
        // var arr2 = [30, 40]
        // var arr3 = [50, 60,70]
        // var arr4 = [80, 90]
        // var arr5=[...arr1,...arr2,...arr3,...arr4]
        // console.log(arr5)


        // var arr1 =[10,20,17,7,31,22,12]
        // // var max=Math.max(10,20,17,7,31,22,12)
        // // var max=Math.max(arr1) //拿不到 nan
        // var max=Math.max(...arr1)
        // console.log(max)

        var obj = { name: 'zhicha', age: 18 }
       console.log('7373',obj)
    //    console.log('36765',...obj)  //不方便打印
    //    作用1：用来复制对象
    //     注意：展开书写的顺序问题
     var obj2={
        gender:'男',
       ...obj
     }
      console.log(obj2)


    </script>
</body>

</html>